package com.content.view.Frame.MainPanel
{
	import com.library.core.IDisposable;
	import com.library.core.UIObject;
	
	import flash.display.Shape;
	import flash.errors.IllegalOperationError;
	
	public class SPBase extends UIObject implements IDisposable
	{
		public static const NAME:String						= 'SPBase';
		
		protected var _areaW:int;
		protected var _areaH:int;
		protected var _bgColor:uint;
		
		protected var _bg:Shape;
		
		public function SPBase(self:SPBase)
		{
			super();
			if(self != this){				
				throw new IllegalOperationError("错误: SPBase 类不能被实例化！");
			}
			
			_bgColor = Math.random() * 0xFFFFFF;
			
			_bg = new Shape();
			addChild(_bg);
		}
		
		/* Public Method
		* ---------------------------------------------------- */
		public function SetLayout(areaWidth:int, areaHeight:int):void{
			_areaW = areaWidth;
			_areaH = areaHeight;
			
//			_bg.graphics.clear();
//			_bg.graphics.beginFill(_bgColor, 0.4);
////			_bg.graphics.lineStyle(1, 0x000000, 1);
//			_bg.graphics.drawRect(0,0,areaWidth,areaHeight);
		}
		
		public function Dispose():void
		{
		}
	}
}